package com.fertshop.gui;

import java.awt.Color;

import javax.swing.JButton;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JSeparator;
import javax.swing.JTextArea;
import javax.swing.JTextField;

import com.fertshop.gui.listener.PrintActionListener;
import com.fertshop.gui.listener.SubmitActionListener;
import com.fertshop.gui.listener.UpdateShopActionListener;
public class MainPanel extends JPanel{
	
	private static final long serialVersionUID = 4089203889753447163L;
	
	private JTextField shopNameTf;
	private JTextField ProprietorNameTf;
	private JTextField LicenseNoTf;
	private JTextArea addressTa;
	private JTextField doorNoTf;
	private JTextField areaTf;
	private JTextField spDoorNoTf;
	private JTextField spAreaTf;
	private JButton submit;
	private JButton updateButton;
	

	public MainPanel(){
		setLayout(null);
		setBackground(Color.lightGray);
		
		JLabel shopNameLabel=new JLabel("Shop Name :");
		shopNameLabel.setBounds(100,50,75,30);
		add(shopNameLabel);
		
		shopNameTf=new JTextField();
		shopNameTf.setBounds(190,50,200,30);
		add(shopNameTf);
		
		JLabel ProprietorNameLabel=new JLabel("Proprietor Name :");
		ProprietorNameLabel.setBounds(70,90,100,30);
		add(ProprietorNameLabel);
		
		ProprietorNameTf=new JTextField();
		ProprietorNameTf.setBounds(190,90,200,30);
		add(ProprietorNameTf);
		
		JLabel LicenseNoLabel=new JLabel("License Number :");
		LicenseNoLabel.setBounds(70,130,100,30);
		add(LicenseNoLabel);
		
		LicenseNoTf=new JTextField();
		LicenseNoTf.setBounds(190,130,200,30);
		add(LicenseNoTf);
		
		JLabel addressLabel=new JLabel("Address :");
		addressLabel.setBounds(100,170,100,30);
		add(addressLabel);
		
		addressTa=new JTextArea(28,10);
		JScrollPane scroll=new JScrollPane(addressTa);
		scroll.setBounds(190,170,200,80);
		add(scroll);
		
		JSeparator separator= new JSeparator();
		separator.setBounds(0,260,500,3);
		add(separator);
		
		JLabel salePointLabel=new JLabel("Sale Point :-");
		salePointLabel.setBounds(10,270,70,30);
		add(salePointLabel);
		
		JLabel doorNoLabel=new JLabel("Door Number :");
		doorNoLabel.setBounds(70,310,100,30);
		add(doorNoLabel);
		
		doorNoTf=new JTextField();
		doorNoTf.setBounds(190,310,200,30);
		add(doorNoTf);
		
		JLabel areaLabel=new JLabel("Area :");
		areaLabel.setBounds(100,350,100,30);
		add(areaLabel);
		
		areaTf=new JTextField();
		areaTf.setBounds(190,350,200,30);
		add(areaTf);
		
		JSeparator salePointSeparator= new JSeparator();
		salePointSeparator.setBounds(0,385,500,3);
		add(salePointSeparator);
		
		JLabel storagePointLabel=new JLabel("Storage Point :-");
		storagePointLabel.setBounds(10,395,110,30);
		add(storagePointLabel);
		
		JLabel spDoorNoLabel=new JLabel("Door Number :");
		spDoorNoLabel.setBounds(70,435,100,30);
		add(spDoorNoLabel);
		
		spDoorNoTf=new JTextField();
		spDoorNoTf.setBounds(190,435,200,30);
		add(spDoorNoTf);
		
		JLabel spAreaLabel=new JLabel("Area :");
		spAreaLabel.setBounds(100,475,100,30);
		add(spAreaLabel);
		
		spAreaTf=new JTextField();
		spAreaTf.setBounds(190,475,200,30);
		add(spAreaTf);
		
		submit=new JButton("Submit");
		submit.addActionListener(new SubmitActionListener(this));
		submit.setBounds(145,515, 100,30);
		add(submit);
		
		JButton print=new JButton("Print");
		print.addActionListener(new PrintActionListener(this));
		print.setBounds(250, 515, 100, 30);
		add(print);
		
		updateButton=new JButton("Update");
		updateButton.addActionListener(new UpdateShopActionListener(this));
		updateButton.setBounds(145, 550,100, 30);
		add(updateButton);
	}


	public JTextField getShopNameTf() {
		return shopNameTf;
	}


	public void setShopNameTf(JTextField shopNameTf) {
		this.shopNameTf = shopNameTf;
	}


	public JTextField getProprietorNameTf() {
		return ProprietorNameTf;
	}


	public void setProprietorNameTf(JTextField proprietorNameTf) {
		ProprietorNameTf = proprietorNameTf;
	}


	public JTextField getLicenseNoTf() {
		return LicenseNoTf;
	}


	public void setLicenseNoTf(JTextField licenseNoTf) {
		LicenseNoTf = licenseNoTf;
	}


	public JTextArea getAddressTa() {
		return addressTa;
	}


	public void setAddressTa(JTextArea addressTa) {
		this.addressTa = addressTa;
	}


	public JTextField getDoorNoTf() {
		return doorNoTf;
	}


	public void setDoorNoTf(JTextField doorNoTf) {
		this.doorNoTf = doorNoTf;
	}


	public JTextField getAreaTf() {
		return areaTf;
	}


	public void setAreaTf(JTextField areaTf) {
		this.areaTf = areaTf;
	}


	public JTextField getSpDoorNoTf() {
		return spDoorNoTf;
	}


	public void setSpDoorNoTf(JTextField spDoorNoTf) {
		this.spDoorNoTf = spDoorNoTf;
	}


	public JTextField getSpAreaTf() {
		return spAreaTf;
	}


	public void setSpAreaTf(JTextField spAreaTf) {
		this.spAreaTf = spAreaTf;
	}


	public JButton getSubmit() {
		return submit;
	}


	public void setSubmit(JButton submit) {
		this.submit = submit;
	}


	public JButton getUpdateButton() {
		return updateButton;
	}


	public void setUpdateButton(JButton updateButton) {
		this.updateButton = updateButton;
	}


	
}
